package com.xcity.game.task.condition;

import com.alibaba.fastjson.annotation.JSONField;
import com.xcity.game.task.TaskCondition;
import com.xcity.game.task.TaskTemplate;

/**
 * 掠夺/被掠夺
 * @author yang.li
 *
 */
public class BuildAttackTaskCondition extends TaskCondition {

	@JSONField(serialize = false)
	protected byte result; // 0:失败, 1:成功
	@JSONField(serialize = false)
	protected int num; // 次数
	
	public BuildAttackTaskCondition(TaskTemplate template) {
		super(template);
		int[] conds = template.getConditions();
		this.result = (byte) conds[0];
		this.num = conds[1];
	}

	public byte getResult() {
		return result;
	}

	public void setResult(byte result) {
		this.result = result;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	@Override
	public int toClientCond() {
		return 0;
	}
}
